package com.ssy.lingxi.contract.model.vo.applyamount.request;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.PositiveOrZero;
import java.io.Serializable;

/**
 * 保存请款单明细请求接口VO
 * @author 伍将
 * @date 2021/3/11
 * @version 2.0.0
 */
public class ApplyAmountOrderSaveDetailVO implements Serializable {
    private static final long serialVersionUID = -8300091167255502680L;

    /**
     * 请款明细id(为0代表新增)
     */
    @NotNull(message = "请款明细id不能为空")
    @PositiveOrZero(message = "请款明细id不能为空")
    private Long id;

    /**
     * 合同执行情况id
     */
    private Long executeId;

    /**
     * 请款金额
     */
    @NotNull(message = "请款金额不能为空")
    private Double applyAmount;
    /**
     * 单据Id
     */
    @NotNull(message = "单据Id不能为空")
    private Long orderId;

    /**
     * 单据编号
     */
    @NotNull(message = "单据编号不能为空")
    private String orderNO;
    /**
     * 是否含税：0-否，1-是
     */
    @NotNull(message = "是否含税不能为空")
    private Integer isHasTax;

    /**
     *  税率
     */
    @NotNull(message = "税率不能为空")
    private Double taxRate;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getExecuteId() {
        return executeId;
    }
    public Long getExecuteIdBySave() {
        if(executeId!=null&&executeId==0){
            executeId=null;
        }
        return executeId;
    }

    public void setExecuteId(Long executeId) {
        this.executeId = executeId;
    }

    public Double getApplyAmount() {
        return applyAmount;
    }

    public void setApplyAmount(Double applyAmount) {
        this.applyAmount = applyAmount;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public String getOrderNO() {
        return orderNO;
    }

    public void setOrderNO(String orderNO) {
        this.orderNO = orderNO;
    }

    public Integer getIsHasTax() {
        return isHasTax;
    }

    public void setIsHasTax(Integer isHasTax) {
        this.isHasTax = isHasTax;
    }

    public Double getTaxRate() {
        return taxRate;
    }

    public void setTaxRate(Double taxRate) {
        this.taxRate = taxRate;
    }
}
